Broadly, the function of a compiler is to compile a source program written in a high level language into a target program for a given instruction set architecture (ISA), which is understood by a machine in which the compiled program is executed.
In order to increase computational throughput, a compiler may perform transformations in order to optimize the speed at which the compiled program can be executed.
The output of the compiler, i.e., the compiled code will be referred to hereinafter as “macroinstructions.” This is in contrast to microinstructions, which refers to the machine implementation-specific internal representation of instructions for a given ISA. Generally, these microinstructions are not visible to a compiler. A given macroinstruction may have several microinstructions, each of which is machine implementation-specific.
Since a particular microinstruction will typically only execute correctly on a machine that understands the microinstruction, a natural limit to how much optimization a compiler does is imposed by the requirement that in general, the macroinstructions produced by a compiler should be able to execute on all machines that support a given ISA, regardless of what microinstructions correspond to the macroinstructions.
If the microinstructions corresponding to each macroinstruction in an ISA is known, a compiler may be able to optimize the code even further by producing a machine implementation-specific microinstructions.
However, in such a case, because the microinstructions are machine implementation-specific, the microinstructions will no longer operate on other machines that share the same ISA, but have different microinstructions corresponding to the macroinstructions in the ISA.